package com.ruoyi.common.core.domain.entity;

import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 用户部门树形表
 * 
 * @author luguanqing
 */
public class SysUserDept extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private String id;

    /**
     * 父级id
     */
    private String parentId;

    /**
     * 名称
     */
    private String name;

    /**
     * 类型
     */
    private String type;


    /** 子集 */
    private List<SysUserDept> children = new ArrayList<SysUserDept>();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public List<SysUserDept> getChildren() {
        return children;
    }

    public void setChildren(List<SysUserDept> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("postId", getId())
            .append("postCode", getParentId())
            .append("postName", getName())
            .append("type", getType())
            .toString();
    }
}
